Order-Sorted Algebra I: Equational Deduction for Multiple Inheritance, Overloading, Exceptions and Partial Operations

نویسندگان

  • Joseph A. Goguen
  • José Meseguer
چکیده

This paper generalizes many-sorted algebra (hereafter, MSA) to order-sorted algebra (hereafter, OSA) by allowing a partial ordering relation on the set of sorts. This supports abstract data types with multiple inheritance (in roughly the sense of object-oriented programming), several forms of polymorphism and overloading, partial operations (as total on equationally deened subsorts), exception handling, and an operational semantics based on term rewriting. We give the basic algebraic constructions for OSA, including quotient, image, product and term algebra, and we prove their basic properties, including Quotient, Homomorphism, and Initiality Theorems. The paper's major mathematical results include a notion of OSA deduction, a Completeness Theorem for it, and an OSA Birkhoo Variety Theorem. We also develop conditional OSA, including Initiality, Completeness, and McKinsey-Malcev Quasivariety Theorems, and we reduce OSA to (conditional) MSA, which allows lifting many known MSA results to OSA. Retracts, which intuitively are left inverses to subsort inclusions , provide relatively inexpensive run-time error handling. We show that it is safe to add retracts to any OSA signature, in the sense that it gives rise to a conservative extension. A nal section compares and contrasts many diierent approaches to OSA. This paper also includes several examples demonstrating the exibility and applicability of OSA, including some standard benchmarks like STACK and LIST, as well as a much more substantial example, the number hierarchy from the naturals up to the quaternions.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Formalising Ontologies and Their Relations

Software Speci cation, pages 292{332. Springer, 1980. Lecture Notes inComputer Science, Volume 86.[6] Robert L. Carpenter. The Logic of Typed Feature Structures, volume 32 of Cam-bridge Tracts in Theoretical Computer Science. Cambridge, 1992.[7] Corina Ĉ rstea. A semantical study of the object paradigm. Transfer thesis, OxfordUniversity Computing Laboratory, 1996.[8] R<l...

متن کامل

The equivalence axiom and univalent models of type theory . ( Talk at CMU on February 4 , 2010 ) By

I will show how to define, in any type system with dependent sums, products and Martin-Lof identity types, the notion of a homotopy equivalence between two types and how to formulate the Equivalence Axiom which provides a natural way to assert that ”two homotopy equivalent types are equal”. I will then sketch a construction of a model of one of the standard Martin-Lof type theories which satisf...

متن کامل

Completion of Rewrite Systems with Membership Constraints. Part I: Deduction Rules

We consider a constrained equational logic where the constraints are membership conditions t 2 s where s is interpreted as a regular tree language. Our logic includes a fragment of second order equational logic (without projections) where second order variables range over regular sets of contexts. The problem with constrained equational logics is the failure of the critical pair lemma. That is ...

متن کامل

Stretching First Order Equational Logic: Proofs with Partiality, Subtypes and Retracts

It is widely recognized that equational logic is simple, (relatively) decidable, and (relatively) easily mechanized. But it is also widely thought that equational logic has limited applicability because it cannot handle subtypes or partial functions. We show that a modest stretch of equational logic eeectively handles these features. Space limits preclude a full theoretical treatment, so we oft...

متن کامل

Models and Equality for Logical Programming

1 I n t r o d u c t i o n This paper argues that some very significant benefits are available to logic programming from using certain concepts from first order model theory, namely: • order-sorted logic and models; • initial models; • interpretation into rLxed models for certain fLxed sorts, functions and relations; and • true semantic equality. These techniques, which are all standard in the t...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Theor. Comput. Sci.

دوره 105  شماره 

صفحات  -

تاریخ انتشار 1992